<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>斐波那契</title>
</head>
<body>
<h2>斐波那契第25位数是<span id="span"></span></h2>
<script>
    function fbnq(n){
        if(n == 1 || n == 2){
            return 1;
        }else{
            return fbnq(n - 1)+fbnq(n - 2);
        }

    }

    console.log(fbnq(25));

    document.querySelector("#span").innerHTML = fbnq(25);
</script>
</body>
</html>